﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace lifeofbob
{
    class Shuriken : Projectile
    {
        static int size = 12;
        static Texture2D texture = TextureLibrary.shuriken;
        private float angle;

        public Shuriken(Vector2 pos, Vector2 speed) : base(pos, new Point(size, size), speed, texture) 
        {
            Random rand = new Random();
            angle = rand.Next(-1, 1);
        }

        public Shuriken(Vector2 pos, Vector2 speed, int size)
            : base(pos, new Point(size,size), speed, texture)
        {

        }

        public override void Update(GameTime gt)
        {
            angle += 0.2f;
          
            base.Update(gt);
        }

        public override void Draw(SpriteBatch sb)
        {
            sb.Draw(texture, rectangle, null, Color.White, angle, new Vector2(20, 20), SpriteEffects.None, 0);
        }
    }
}
